package com.atguigu.practice;

import java.util.Scanner;

public class DividePitch {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        while(scanner.hasNextInt()){
            int n=scanner.nextInt(); //小猴子个数
            int a=0; //开始时最少需要的桃子数
            int b=0; //老猴子获得的桃子数
            a=(int)Math.pow(5,n)-4;
            b=(int)Math.pow(4,n)+n-4;
            System.out.println(a+" "+b);
        }
    }
}
